Math 434
Problem
2.3
Develop
all of the processes necessary to solve the TopSpin game and write up an
algorithm for solving it. Include a justification for how many of the states
are reachable and, if possible, which permutations in S20 they
represent.
Holding
the topspin game with the purple disc away from you, let the counter-clockwise
most position in the purple disc be the 1 position (left most position with
disc away from you). Let the position
clockwise from the 1 position be the 2 position, and so on for all twenty
positions. Note the 20 position is one
position counter-clockwise from the 1 position.
Let
g and h be elements of S20.
Let
g = (1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20)
Let
h = (1,4) (2,3)
Note that g is equivalent to moving all of the pieces one position in a clockwise direction, and h is equivalent to a 180-degree rotation of the purple disc. So g and h generate the TopSpin group G, and G is a subgroup of S20.
Note:
g-1 =
(20,19,18,17,16,15,14,13,12,11,10,9,8,7,6,5,4,3,2,1)
h = h-1
|g| = 20 and |h| = 2
As
with the Rubiks Cube, let [hg] = hgh-1g-1. Therefore [hg-1] = hg-1h-1g.
[hg-1] =
(1,3,5,2,4)
So [hg-1]2
= (1,5,4,3,2)
([hg-1]2 g-4
)5 = (2,20,19,18,17,16,15,14,13,12,11,10,9,8,7,6,5,4,3)
Then ([hg-1]2
g-4 )5 g = (1,2)
With
this as an inspiration, we can permute one with anything in G.
let a = ([hg-1]2
g-4 )5.
We claim (1,n) = an-1(g2a)n-2g
for 1 < n < 20
Note
that a2 = (20,18,16,14,12,10,8,6,4,2,19,17,15,13,11,9,7,5,3), i.e. a2
fixes 1 and shifts everything else two positions counter-clockwise (except 2
and 3 which move three positions counter-clockwise in order to skip 1). Essentially we have put 1 between 3 and 4. Similarly an-1 will fix 1 and
move everything else n-1 positions counter-clockwise putting 1 between the n
and n+1.
Now
in order to switch 1 and n we next need to put n between 20 and 2. Recall 1 is still in the 1 position and n is
in the 20 position.
Note
g2a = (1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19), i.e. g2a
fixes the twenty position and moves everything else one position clockwise. So
g2a will put n between n-2 and n-1,
(g2a)2 will put n between n-3 and n-2, and (g2a)m
will put n between n-(m+1) and n-m. In
particular (g2a)n-2 will put n between 1 and 2. But recall that we have already put one
between n and n+1, so 20 is next to 2.
Thus after an-1(g2a)n-2, n is between
20 and 2 and since we moved n away, 1 is between n-1 and n+1. Finally n is in the 20 position and we want
it in the 1 position, so g simply moves everything one position clockwise.
Furthermore
we can permute any two distinct positions in G.
For any m, n with 1 <
m < 20, 1 < n < 20, and m < n.
(m,n) = g1-m (a(n
- m) (g2a)(n - m
- 1) g) gm-1
Note (m,n) = (n,m) for any m
and n.
Now
we can show that G = S20.
Recall that G is a subgroup of S20. Thus if we can show that S20 is a subset of G we are
done. Let k be an arbitrary element in
S20. Then k is a permutation
and can be written in cycle notation.
Each disjoint cycle of k may be written (n1, n2,
, ni) where 1 < i < 20. The cycle (n1, n2,
, ni) can be rewritten as a product of transpositions,
specifically (n1, ni) (n1, ni-1)
(n1, n3) (n1, n2). Since we can permute any two distinct
positions in G, we can reach k. Thus G
= S20; that is every permutation in S20 can be reached on
the TopSpin game.
An
algorithm to solve the TopSpin game.
Let
1o denote the piece with 1 written on it and 2o denote
the piece with two written on it and so on for all twenty pieces.
I. Positioning the first sixteen pieces.
i.
If
1o is not in the 1, 2, or
3 position then do hg3, and repeat i. until 1o is in one
of the 1, 2, or 3 positions.
ii.
If
1o is in one of the 1, 2, or 3 position:
a.
If
1o is in the 1 position do (g-2h) (gh) to position 2o
next to 1o.
b.
If
1o is in the 2 position do (g-2h) (g-1h) (gh)
to position 2o next to 1o.
c.
If
1o is in the 3 position then 2o is next to 1o,
so continue to B.
II. Positioning the remaining four pieces (recall a = ([hg-1]2
g-4 )5 ).
i. If 17o is in the 1 position proceed to B.
ii. If 17o is in the 2 position do ag to position 17o
next to 16o.
iii. If 17o is in the 3 position do g-1ag2ag
to position 17o next to 16o.
iv. If 17o is in the 4 position do h to position 17o
next to 16o.
i. If 18o is in the 1 position proceed to C.
ii. If 18o is in the 2 position do ag to position 18o
next to 17o.
iii. If 18o is in the 3 position do g-1ag2ag
to position 18o next to 17o.
i. If 19o is in the 1 position then do g―-2 to
finish.
ii. If 19o is in the 2 position do ag-1 to
finish.